package com.itelite.mapper;

import com.itelite.domain.dto.*;
import com.itelite.domain.pojo.TrainingRecord;
import com.itelite.domain.pojo.TrainingRecordFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 沈洋 邮箱:1845973183@qq.com
 * @create 2021/8/6-23:44
 **/
@Mapper
public interface RecordMapper {

    Integer insertTrainingRecord(TrainingRecord record);

    Integer insertRecordFiles(List<TrainingRecordFile> fileList);

    TrainingRecordDto queryTrainingRecordDetail(Integer recordId);

    List<GroupRecordExcel> queryTrainingRecordByGroup(RecordParam recordParam);

    List<String> queryRecordFilesByRecordId(Integer recordId);

    void insertRecordTeacher(@Param("recordId") Integer recordId, String[] array);

    List<TrainingRecordVo> queryTrainingRecordVo(RecordParam recordParam);

    List<TimelineRecord> queryTimelineRecord();

    void updateRecordCover(@Param("recordId") Integer recordId, String url);

    int deleteRecord(@Param("recordId") Integer recordId, @Param("deleteDate") int deleteDate,@Param("userId") Integer userId, Integer[] groupIds);

    void deleteRecordTeacher(Integer recordId);

    void deleteRecordFile(Integer recordId);

    List<TeacherRecordExcel> queryTeacherTrainingRecord(RecordParam param);

    List<Integer> queryTeacherForTrainingRecord(RecordParam recordParam);

    Integer queryGroupIdByRecordId(Integer recordId);
}
